package com.devilvan.betrice.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.devilvan.betrice.common.BasePo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.Accessors;
import org.hibernate.annotations.DynamicInsert;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.Table;
import java.io.Serial;
import java.io.Serializable;

/**
* @author Evad.Wu
* @Description 角色-部门关联信息表 映射
* @date 2023-08-11
*/
@Setter
@Getter
@ToString
@NoArgsConstructor
@Accessors(chain = true)
@TableName(value = "SYS_ROLE_DEPT")
@EqualsAndHashCode(callSuper = false)

@Entity
@Table(name = "SYS_ROLE_DEPT")
@DynamicInsert
@EntityListeners(AuditingEntityListener.class)
@Schema(description = "角色-部门关联信息表 映射")
public class SysRoleDeptPo extends BasePo implements Serializable {
    @Serial
    private static final long serialVersionUID = -1528200270546027175L;
    @Schema(description = "角色ID")
    @TableField(value = "ROLE_ID")
    @Column(name = "ROLE_ID", columnDefinition = "BIGINT(19) NOT NULL COMMENT '角色ID'")
    private Long roleId;
    @Schema(description = "部门ID")
    @TableField(value = "DEPT_ID")
    @Column(name = "DEPT_ID", columnDefinition = "BIGINT(19) NOT NULL COMMENT '部门ID'")
    private Long deptId;
}
